<%@page import="com.xxb.util.DateUtil"%>
<%@page import="com.xxb.entity.User"%>
<%@page import="com.xxb.dao.UserDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	request.setCharacterEncoding("UTF-8");
	
	String useremail = request.getParameter("useremail");
	String userpwd = request.getParameter("userpwd");
	
	UserDao dao = new UserDao();
	
	User user = new User();
	user.setUseremail(useremail);
	user.setUserpwd(userpwd);
	user.setCreatetime(DateUtil.getTime());
	
	int rows = dao.save(user);
	if(rows > 0){
		response.sendRedirect("main.jsp");
	}
%>